﻿

using HBKY.Shop.Common.Redis;
using HBKY.Shop.IService.Customer;
using Microsoft.Extensions.Logging;
using Quartz;
using System.Threading.Tasks;

namespace HBKY.Shop.Tasks
{
    public class TestJob : JobBase
    {
        private readonly ILogger<TestJob> _logger;
        private readonly ICustomerService _customerService;
        public TestJob(ICustomerService customerService, ILogger<TestJob> logger, IRedisBasketRepository redis) : base(redis)
        {
            _customerService = customerService;
            _logger = logger;
        } 
        
        public override async Task Run(IJobExecutionContext context, int jobId)
        {
            var list = await _customerService.GetCustomerList();
            _logger.LogInformation("Run TestJob !!!!!!!");
            await Task.FromResult(true);
        }
    }
}
